//方法的重载
import java.util.Scanner;
public class TestMethod {
    public static int getSum(int num1,int num2)
    {
        int ret=num1+num2;
        return ret;
    };
    public static double getSum(double num1,double num2,double num3)
    {
        double ret=num1+num2+num3;
        return ret;
    };
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("输入两个整数：");
        int num1=sc.nextInt();
        int num2=sc.nextInt();
        System.out.println(getSum(num1,num2));

        System.out.println("输入三个小数：");
        double num3=sc.nextDouble();
        double num4=sc.nextDouble();
        double num5= sc.nextDouble();
        System.out.println(getSum(num3,num4,num5));


    }
}
